package com.jzr.board.controller.api;

import com.jzr.board.db1.service.TPatientService;
import com.jzr.board.db1.vo.BedPatientVo;
import com.jzr.common.entity.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "病人接口")
@RestController
@RequestMapping("/api/patient")
public class PatientController {
    @Autowired
    private TPatientService patientService;

    @ApiOperation("获取病人列")
    @GetMapping("/list")
    public Result<List<BedPatientVo>> list(@ApiParam("科室编号") @RequestParam String deptCode){
        List<BedPatientVo> list = patientService.list(deptCode);
        return Result.success("成功",list);
    }
}
